package com.ticket.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import com.ticket.common.annotation.Excel;
import com.ticket.common.core.domain.BaseEntity;
import org.springframework.data.annotation.Transient;

/**
 * 订单对象 yanchu_order
 * 
 * @date 2023-09-26
 */
public class YanchuOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private Long id;

    /** 订单号 */
    @Excel(name = "订单号")
    private String orderId;

    /** 登录用户 */
    @Excel(name = "登录用户")
    private Long userId;

    /** 场次编码 */
    @Excel(name = "场次编码")
    private Long sessionId;

    /** 演出时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "演出时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date yanchuStart;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date yanchuEnd;

    /** 总价格 */
    @Excel(name = "总价格")
    private BigDecimal totalMoney;

    /** 支付状态，1：已占票等待支付，2：已支付，3：超时未支付自动取消，4：支付后退款 */
    @Excel(name = "支付状态，10：已占票等待支付，2：已支付，3：超时未支付自动取消，4：支付后退款")
    private Integer status;

    /** 退款状态，1：提交退款，2：退款审核成功，3：退款中，4：退款成功, 5:退款失败 */
    @Excel(name = "退款状态，1：提交退款，2：退款审核成功，3：退款中，4：退款成功, 5:退款失败")
    private Integer refundStatus;

    /** 最晚支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最晚支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expireTime;
    @Excel(name = "用户IP")
    private String userIp;
    @Excel(name = "openId")
    private String openId;
    @Excel(name = "演出编码")
    private Long performId;
    @ApiModelProperty(value = "订单详情",dataType = "YanchuOrderDetail",hidden = true)
    private List<YanchuOrderDetail> orderDetails;
    @Excel(name = "支付单号")
    private String prePayId;
    @Excel(name = "支付时间")
    private Date payTime;
    @Excel(name = "订单联系人姓名")
    private String contacts;
    @Excel(name = "订单联系人电话（联系方式）")
    private String contactNumber;
    @Excel(name = "应付金额")
    private BigDecimal yingfuMoney;

    @Transient
    private Long operaId;
    @Transient
    private Integer authType;

    @Excel(name = "余额支付金额")
    private BigDecimal balanceAmt = BigDecimal.ZERO;
    @Excel(name = "观演卡支付金额")
    private BigDecimal cardAmt = BigDecimal.ZERO;

    @Excel(name = "微信支付金额")
    private BigDecimal wechatAmt = BigDecimal.ZERO;

    @Excel(name = "余额退款金额")
    private BigDecimal balanceRefundAmt = BigDecimal.ZERO;
    @Excel(name = "观演卡退款金额")
    private BigDecimal cardRefundAmt = BigDecimal.ZERO;

    @Excel(name = "微信退款金额")
    private BigDecimal wechatRefundAmt = BigDecimal.ZERO;
    @Transient
    private String sign;

    private String outOrderNo;
    @Excel(name = "购票类型 1小程序购票 2后台出票")
    private Integer ticketType;
    @Excel(name = "出票类型1团购票 2工作票3赠票 4其他")
    private Integer ticketWay = 0;

    @Excel(name = "其他出票类型")
    private String ticketWayName;
    @Excel(name = "出票方式 1电子票")
    private Integer ticketOutWay;
    @Excel(name = "优惠政策1不使用优惠 2自定义价格 3自定义折扣")
    private Integer discountType;
    @Excel(name = "//备注")
    private String ticketDemo;
    @Excel(name = "付款备注")
    private String payDemo;
    @Excel(name = "折扣/价格")
    private BigDecimal discountPer;
    @Excel(name = "减免金额")
    private BigDecimal discountAmt;
    @Excel(name = "支付方式 1对公转账2抖音支付 3微信支付 4现金 5其他")
    private Integer payWay;
    @Excel(name = "出票付款 1已付款 2欠款")
    private Integer ticketStatus;

    @Excel(name = "出票付款 1已付款 2欠款")
    private String payName;
    public String getPayName() {
        return payName;
    }

    public void setPayName(String payName) {
        this.payName = payName;
    }

    public Integer getTicketStatus() {
        return ticketStatus;
    }

    public void setTicketStatus(Integer ticketStatus) {
        this.ticketStatus = ticketStatus;
    }

    public BigDecimal getDiscountAmt() {
        return discountAmt;
    }

    public void setDiscountAmt(BigDecimal discountAmt) {
        this.discountAmt = discountAmt;
    }
    public Integer getTicketOutWay() {
        return ticketOutWay;
    }

    public void setTicketOutWay(Integer ticketOutWay) {
        this.ticketOutWay = ticketOutWay;
    }

    public Integer getTicketType() {
        return ticketType;
    }

    public void setTicketType(Integer ticketType) {
        this.ticketType = ticketType;
    }

    public Integer getTicketWay() {
        return ticketWay;
    }

    public void setTicketWay(Integer ticketWay) {
        this.ticketWay = ticketWay;
    }

    public Integer getDiscountType() {
        return discountType;
    }

    public void setDiscountType(Integer discountType) {
        this.discountType = discountType;
    }

    public String getTicketDemo() {
        return ticketDemo;
    }

    public void setTicketDemo(String ticketDemo) {
        this.ticketDemo = ticketDemo;
    }

    public BigDecimal getDiscountPer() {
        return discountPer;
    }

    public void setDiscountPer(BigDecimal discountPer) {
        this.discountPer = discountPer;
    }

    public Integer getPayWay() {
        return payWay;
    }

    public void setPayWay(Integer payWay) {
        this.payWay = payWay;
    }


    public String getOutOrderNo() {
        return outOrderNo;
    }

    public void setOutOrderNo(String outOrderNo) {
        this.outOrderNo = outOrderNo;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }


    public BigDecimal getBalanceRefundAmt() {
        return balanceRefundAmt;
    }

    public void setBalanceRefundAmt(BigDecimal balanceRefundAmt) {
        this.balanceRefundAmt = balanceRefundAmt;
    }

    public BigDecimal getCardRefundAmt() {
        return cardRefundAmt;
    }

    public void setCardRefundAmt(BigDecimal cardRefundAmt) {
        this.cardRefundAmt = cardRefundAmt;
    }

    public BigDecimal getWechatRefundAmt() {
        return wechatRefundAmt;
    }

    public void setWechatRefundAmt(BigDecimal wechatRefundAmt) {
        this.wechatRefundAmt = wechatRefundAmt;
    }

    public BigDecimal getBalanceAmt() {
        return balanceAmt;
    }

    public void setBalanceAmt(BigDecimal balanceAmt) {
        this.balanceAmt = balanceAmt;
    }

    public BigDecimal getCardAmt() {
        return cardAmt;
    }

    public void setCardAmt(BigDecimal cardAmt) {
        this.cardAmt = cardAmt;
    }

    public BigDecimal getWechatAmt() {
        return wechatAmt;
    }

    public void setWechatAmt(BigDecimal wechatAmt) {
        this.wechatAmt = wechatAmt;
    }

    public Integer getAuthType() {
        return authType;
    }

    public void setAuthType(Integer authType) {
        this.authType = authType;
    }

    public Long getOperaId() {
        return operaId;
    }

    public void setOperaId(Long operaId) {
        this.operaId = operaId;
    }

    public BigDecimal getYingfuMoney() {
        return yingfuMoney;
    }

    public void setYingfuMoney(BigDecimal yingfuMoney) {
        this.yingfuMoney = yingfuMoney;
    }

    public String getPrePayId() {
        return prePayId;
    }

    public void setPrePayId(String prePayId) {
        this.prePayId = prePayId;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public String getContacts() {
        return contacts;
    }

    public void setContacts(String contacts) {
        this.contacts = contacts;
    }

    public String getContactNumber() {
        return contactNumber;
    }

    public void setContactNumber(String contactNumber) {
        this.contactNumber = contactNumber;
    }


    public Long getPerformId() {
        return performId;
    }

    public void setPerformId(Long performId) {
        this.performId = performId;
    }


    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }


    public String getUserIp() {
        return userIp;
    }

    public void setUserIp(String userIp) {
        this.userIp = userIp;
    }

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setOrderId(String orderId) 
    {
        this.orderId = orderId;
    }

    public String getOrderId() 
    {
        return orderId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setSessionId(Long sessionId) 
    {
        this.sessionId = sessionId;
    }

    public Long getSessionId() 
    {
        return sessionId;
    }
    public void setYanchuStart(Date yanchuStart) 
    {
        this.yanchuStart = yanchuStart;
    }

    public Date getYanchuStart() 
    {
        return yanchuStart;
    }
    public void setYanchuEnd(Date yanchuEnd) 
    {
        this.yanchuEnd = yanchuEnd;
    }

    public Date getYanchuEnd() 
    {
        return yanchuEnd;
    }
    public void setTotalMoney(BigDecimal totalMoney)
    {
        this.totalMoney = totalMoney;
    }

    public BigDecimal getTotalMoney()
    {
        return totalMoney;
    }
    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }
    public void setRefundStatus(Integer refundStatus)
    {
        this.refundStatus = refundStatus;
    }

    public Integer getRefundStatus()
    {
        return refundStatus;
    }
    public void setExpireTime(Date expireTime) 
    {
        this.expireTime = expireTime;
    }

    public Date getExpireTime() 
    {
        return expireTime;
    }

    public List<YanchuOrderDetail> getOrderDetails() {
        return orderDetails;
    }

    public void setOrderDetails(List<YanchuOrderDetail> orderDetails) {
        this.orderDetails = orderDetails;
    }

    public String getPayDemo() {
        return payDemo;
    }

    public void setPayDemo(String payDemo) {
        this.payDemo = payDemo;
    }

    public String getTicketWayName() {
        return ticketWayName;
    }

    public void setTicketWayName(String ticketWayName) {
        this.ticketWayName = ticketWayName;
    }
    @Override
    public String toString() {
        return "YanchuOrder{" +
                "id=" + id +
                ", orderId='" + orderId + '\'' +
                ", userId=" + userId +
                ", sessionId=" + sessionId +
                ", yanchuStart=" + yanchuStart +
                ", yanchuEnd=" + yanchuEnd +
                ", totalMoney=" + totalMoney +
                ", status=" + status +
                ", refundStatus=" + refundStatus +
                ", expireTime=" + expireTime +
                ", userIp='" + userIp + '\'' +
                ", openId='" + openId + '\'' +
                ", performId=" + performId +
                ", orderDetails=" + orderDetails +
                '}';
    }
}
